package sample.viewassets.global
{
	import asf.sections.Section;
	
	import flash.events.MouseEvent;
	
	import sample.view.assets.AMainMenuItem;

	internal class MainMenuItem extends AMainMenuItem
	{
		private var data:Section;
		
		public function MainMenuItem( p_data:Section )
		{
			super( );
			
			stop( );
			
			data = p_data;
			
			this.$tLabel.text = data.menuLabel;
			
			mouseChildren = false;
			
			addEventListener( MouseEvent.ROLL_OVER, over );
			addEventListener( MouseEvent.ROLL_OUT, out );
			
			buttonMode = true;
		}
		
		public function getData( ):Section
		{
			return data;
		}
		
		private function over( evt:MouseEvent ):void
		{
			gotoAndStop( 2 );
		}
		
		private function out( evt:MouseEvent ):void
		{
			gotoAndStop( 1 );
		}
		
	}
}